from django.shortcuts import render
from django.http import HttpResponse
from django.views.generic import ListView,DetailView,View
from .models import *
# Create your views here.


class IndexView(View):
    def get(self,request):
        all_essay = Essay.objects.all()
        return render(request,"html/index.html",{
            'all_essay':all_essay})


class Blog_detail_list(ListView):
    model = Essay
    template_name = "html/blog_list.html"


class Blog_detail_view(DetailView):
    model = Essay
    template_name = "html/blog_detail.html"
    context_object_name = "detail_object"

